home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3348 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: newsbf02.news.aol.com!not-for-mail
  2. From: jipph@aol.com (Jipph)
  3. Newsgroups: comp.lang.c++
  4. Subject: object oriented and real time programming
  5. Date: 23 Jan 1996 09:24:33 -0500
  6. Organization: America Online, Inc. (1-800-827-6364)
  7. Sender: root@newsbf02.news.aol.com
  8. Message-ID: <4e2r31$fd3@newsbf02.news.aol.com>
  9. Reply-To: jipph@aol.com (Jipph)
  10. NNTP-Posting-Host: newsbf02.mail.aol.com
  11.  
  12.      I need some help with making use of interrupt routines in a C++
  13. program.  Turns out that I've written a sort of simple protocol converter
  14. at work.  Because one of the devices we manufacture has an unwieldy native
  15. protocol, the converter allows the use of a simple ascii protocol to make
  16. use of a sub set of the functions of the device.  I wrote the code in C,
  17. and was interested in rewriting it in C++ when I ran across a problem.  I
  18. wanted to make a base class for Uarts.  It occured to me that I can't put
  19. an interrupt routine in the class because when the interrupt occurs there
  20. is no way to know which instance of the class the interrupt routine should
  21. use.  A coworker suggested I use a thing called a thunk.  I admitted I had
  22. some learning to do.  Can anyone tell me what a thunk is, and how it might
  23. help in this situation?  Is it even right thinking to want an interrupt
  24. routine in a class?  I'd appreciate any suggestions.
  25.  
  26.  
  27.  
  28. In your debt (If you have a good answer)
  29.  
  30. Jeff
  31.